proc deoped {nick host handle chan -o victim} {
  # This is designed for when the bot itself is deop'd but could be used for when anyone is deop'd
  global botnick home organization deopwarn

  # If bot is deop'd in home channel, who would the bot bitch to?  God? :P
  if {$chan == $home} {
    return 0
  }

  if {$victim == "$botnick"} {
    if {$deopwarn == "1"} {
      putlog "$nick ($host) deop'd me in $chan"
      putquick "PRIVMSG $home :\0034\002$nick\002 ($host) deop'd me in $chan"
      putquick "PRIVMSG $chan :\0034\002$nick\002 ($host) deop'd me in here"
      putquick "PRIVMSG $chan :\0034You have made a serious violation to \002$organization\002.  If you want me to stay in here, you \002MUST\002 op me.  A message that $nick deop'd me was sent to $home and someone will be in here to check on it." 
      return 0
    }
  }
}









